package com.stormrage.entity.learn.rep;

import java.io.Serializable;
import java.util.Date;

import com.stormrage.constants.Constants;
import com.stormragetech.core.exception.StormrageTechException;
import com.stormragetech.core.util.DateUtil;

/**
 * @Title: LeaTermRep.java
 * @Package com.stormrage.entity.learn.rep
 * @Description: 学期 返回 类
 * @author www.stormragetech.com
 * @date 2016年4月8日
 * @version V1.0
 */
public class LeaTermRep implements Serializable {

	// ------------------------------- Fields -------------------------------

	private static final long serialVersionUID = -1209813329943721465L;

	// ------------------------------- Fields -------------------------------

	private Integer seq;

	private Integer id;

	private String term;

	private Date applyDateStart;

	private Date studyDateStart;

	private Date examDateStart;

	private String applyDateStartStr;

	private String studyDateStartStr;

	private String examDateStartStr;

	private String major;

	private Integer count;

	// ------------------------------- Fields -------------------------------

	public LeaTermRep() {
	}

	// ------------------------------- Fields -------------------------------

	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTerm() {
		return term;
	}

	public void setTerm(String term) {
		this.term = term;
	}

	public String getMajor() {
		return major;
	}

	public void setMajor(String major) {
		this.major = major;
	}

	public Date getApplyDateStart() {
		return applyDateStart;
	}

	public void setApplyDateStart(Date applyDateStart) {
		this.applyDateStart = applyDateStart;
	}

	public Date getStudyDateStart() {
		return studyDateStart;
	}

	public void setStudyDateStart(Date studyDateStart) {
		this.studyDateStart = studyDateStart;
	}

	public Date getExamDateStart() {
		return examDateStart;
	}

	public void setExamDateStart(Date examDateStart) {
		this.examDateStart = examDateStart;
	}

	public String getApplyDateStartStr() {
		return applyDateStartStr;
	}

	public void setApplyDateStartStr(String applyDateStartStr) {
		this.applyDateStartStr = applyDateStartStr;
	}

	public String getStudyDateStartStr() {
		return studyDateStartStr;
	}

	public void setStudyDateStartStr(String studyDateStartStr) {
		this.studyDateStartStr = studyDateStartStr;
	}

	public String getExamDateStartStr() {
		return examDateStartStr;
	}

	public void setExamDateStartStr(String examDateStartStr) {
		this.examDateStartStr = examDateStartStr;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	// ------------------------------- Fields -------------------------------

	public static LeaTermRep instance(LeaTermRep arg0, Integer arg1) throws StormrageTechException {
		arg0.setSeq(arg1);
		arg0.setApplyDateStartStr(DateUtil.dateToStr(arg0.getApplyDateStart(), Constants.DATE_FORMAT_DAY));
		arg0.setStudyDateStartStr(DateUtil.dateToStr(arg0.getStudyDateStart(), Constants.DATE_FORMAT_DAY));
		arg0.setExamDateStartStr(DateUtil.dateToStr(arg0.getExamDateStart(), Constants.DATE_FORMAT_DAY));
		return arg0;
	}

	@Override
	public String toString() {
		return this.getClass() + " : id - " + id + " term - " + term + " applyDateStart - " + applyDateStart
				+ " studyDateStart - " + studyDateStart + " examDateStart - " + examDateStart + " major - " + major
				+ " count - " + count;
	}

}
